line-tools.js

CLI arguments parser

Node.js Command Line Interface module. Provides CLI argument parsing. Project based on http://goo.gl/bSJIV (Patrick Fisher patrick@pwfisher.com)

Install

First change directory to your project

# Change Directory to your project
cd <...>/myNodeProjectFolder/

Install from NPM:

npm install line-tools

You can also install into your project from source:

# Install from sources...
git clone git://github.com/unsektor/line-tools.git node_modules/line-tools

Usage

Require line-tools into your project:

// ...
var parsed_argv = require('line-tools').parse(process.argv);
// Let's print parse result for example
console.log(parsed_argv);
// ...